﻿using ControlCenter.Model;
using MingYuanYun.Data.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using ControlCenter.Model.BizEntities;
using ControlCenter.Model.WebApiDto;

namespace ControlCenter.Data
{
    /// <summary>
    /// 机器人仓储接口
    /// </summary>
    public interface IRobotRepository : IRepositoryBase
    {
        /// <summary>
        /// 根据条件查询机器人数据
        /// </summary>
        /// <param name="paramDto"></param>
        /// <returns></returns>
        Task<IEnumerable<RobotInfoDto>> Query(RobotQueryDto paramDto);

        /// <summary>
        /// 通过ID查找机器人
        /// </summary>
        /// <param name="robotId"></param>
        /// <returns></returns>
        Task<RobotInfo> Find(Guid robotId);

        /// <summary>
        /// 新增或更新机器人信息
        /// </summary>
        /// <param name="robotInfo"></param>
        /// <returns></returns>
        Task<bool> UpdateOrSave(RobotInfo robotInfo);

        /// <summary>
        /// 更新机器人状态
        /// </summary>
        /// <param name="robotId"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        Task<bool> UpdateRobotStatus(Guid robotId, int status);

        /// <summary>
        /// 删除机器人
        /// </summary>
        /// <param name="robotId"></param>
        /// <returns></returns>
        Task<bool> DeleteRobot(Guid robotId);
    }
}
